package com.flying.acls.domain.permission;

import com.flying.acls.model.Permission;
import com.flying.acls.model.PermissionType;


public class PredefinedPermission extends Permission {
    // CURD related permissions.
    public static final Permission CRUD_CREATE = PermissionFactory.get(PermissionType.CRUD, 1); // 1
    public static final Permission CRUD_READ = PermissionFactory.get(PermissionType.CRUD, 1 << 1); // 2
    public static final Permission CRUD_UPDATE = PermissionFactory.get(PermissionType.CRUD, 1 << 2); // 4
    public static final Permission CRUD_DELETE = PermissionFactory.get(PermissionType.CRUD, 1 << 3); // 8
    public static final Permission CRUD_ADMIN = PermissionFactory.get(PermissionType.CRUD, 1 << 4); // 16

    // HTTP related permissions.
    public static final Permission HTTP_OPTIONS = PermissionFactory.get(PermissionType.HTTP, 1); // 1
    public static final Permission HTTP_HEAD = PermissionFactory.get(PermissionType.HTTP, 1 << 1); // 2
    public static final Permission HTTP_GET = PermissionFactory.get(PermissionType.HTTP, 1 << 2); // 4
    public static final Permission HTTP_POST = PermissionFactory.get(PermissionType.HTTP, 1 << 3); // 4
    public static final Permission HTTP_PUT = PermissionFactory.get(PermissionType.HTTP, 1 << 4); // 8
    public static final Permission HTTP_DELETE = PermissionFactory.get(PermissionType.HTTP, 1 << 5); // 8
    public static final Permission HTTP_TRACE = PermissionFactory.get(PermissionType.HTTP, 1 << 6); // 8
    public static final Permission HTTP_CONNECT = PermissionFactory.get(PermissionType.HTTP, 1 << 7); // 8
}